using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Begin : MonoBehaviour
{
    public GameObject outLog;
    private int count = 1;
    public Text _text;


    private void OnTriggerEnter2D(Collider2D coll)
    {
        if (coll.tag == "Player")
        {
            outLog.SetActive(true);
        }
    }

    private void OnTriggerExit2D(Collider2D coll)
    {
        switch (count)
        {
            case 1:
                _text.text = "Let's go,Let's go";
                outLog.SetActive(false);
                count++;
                break;
            case 2:
                count++;
                outLog.SetActive(false);
                break;
            case 3:
                _text.text = "??????????????";
                outLog.SetActive(false);
                count++;
                break;
            case 4:
                count++;
                outLog.SetActive(false);
                break;
            case 5:
                _text.text = "what a stupid people you are";
                outLog.SetActive(false);
                break;
            default:
                break;
        }
    }
}
